Frames


What are frames? Press here for an example. How was it done? This is how. Although it looked like there were only two HTML documents there were actually three. The red page the green page and the divide. The divide is the key to the frames working. start a new HTML document and insert the following:


<HTML> <!-- ARCHIVE by FORTUNECITY.ws --> <HEAD> <TITLE>Frames Example 1</TITLE> </HEAD> <FRAMESET COLS=20%,80%> <FRAME SRC=1.htm NAME=1> <FRAME SRC=2.htm NAME=2> <NOFRAMES>Your browser doesn't support frames</NOFRAMES> </FRAMESET> This divides the pages in to two separate pages, vertically, page 1 (1.htm) which takes up 20% of the page and page 2 (2.htm) which takes up 80% of the page. What is the <NOFRAMES></NOFRAMES> tag for? Well it's for people who have really old browsers - browsers that were programmed before frames had been invented. The text that is placed in between these two tags are what appears on their browsers when they try to open a frames document.


What about horizontal frames? Here's an example. This is how it was done:


<HTML> <!-- ARCHIVE by FORTUNECITY.ws --> <HEAD> <TITLE>Frames Example 2</TITLE> </HEAD> <FRAMESET ROWS=20%,80%> <FRAME SRC=1.htm NAME=1> <FRAME SRC=2.htm NAME=2> <NOFRAMES>Your browser doesn't support frames</NOFRAMES> </FRAMESET>


This divides the page in to two separate pages, horizontally, page 1 (1.htm) which takes up 20% of the page and page 2 (2.htm) which takes up 80% of the page. You've got the frames. Now what? Well how about trying to load a new page in to page 2 from page 1? An excellent example of this is here for a working example or here for a simple example.

Remember to include the target in the link tag and also remember to include the name in the 'FRAME' tag.


When you get really confident you can do something like this!


A Tip For Frames


Unless you are a masachist you will probably hate that ugly grey border. To get rid of it is easy. In between the word 'FRAME' and 'SRC' write 'NORESIZE MARGINHEIGHT=0 MARGINWIDTH=0'


The Advantages and Dis-advantages of Frames


The advantages


1)Makes navigation of the website easy if links are placed in either frame.

2) Makes your website look better.


Dis-advantages


1) Takes longer to load especially if you have a slower computer or modem.

2) Some browsers aren't compatible with frames so some people won't be able to get in to your site with very much ease.